<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
  <link rel="stylesheet" media="screen" type="text/css" href="./style.css" />
  <link rel="stylesheet" media="screen" type="text/css" href="./design.css" />
  <link rel="stylesheet" media="print" type="text/css" href="./print.css" />

  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<div class="dokuwiki export">

<p>
<em>Translations of this page are also available in the following languages:</em> <a href="geda-pcb_footprints.ru.html" class="wikilink1" title="geda-pcb_footprints.ru.html">Русский</a>.
</p>

<h1 class="sectionedit1"><a name="pcb_footprint_guides" id="pcb_footprint_guides">PCB Footprint Guides</a></h1>
<div class="level1">
<ul>
<li class="level1"><div class="li"> <a href="http://pcb.geda-project.org/pcb-cvs/pcb.html" class="urlextern" title="http://pcb.geda-project.org/pcb-cvs/pcb.html"  rel="nofollow">PCB manual</a></div>
</li>
<li class="level1"><div class="li"> The PCB <acronym title="Frequently Asked Questions">FAQ</acronym>: <a href="geda-pcb_tips.html" class="wikilink1" title="geda-pcb_tips.html">pcb_tips</a>.</div>
</li>
<li class="level1"><div class="li"> The PCB Quick-Reference has info on <a href="geda-pcb-quick_reference.html#footprint_reference" class="wikilink1" title="geda-pcb-quick_reference.html">footprints</a></div>
</li>
<li class="level1"><div class="li"> <a href="geda-pcb_footprint_naming_conventions.html" class="wikilink1" title="geda-pcb_footprint_naming_conventions.html">PCB Footprint Naming Conventions</a> : read this to learn how to <em>name</em> your footprint files.</div>
</li>
</ul>

</div>
<!-- EDIT1 SECTION "PCB Footprint Guides" [117-565] -->
<h3 class="sectionedit2"><a name="footprint_basics" id="footprint_basics">Footprint basics</a></h3>
<div class="level3">
<ul>
<li class="level1"><div class="li"> There are two types of footprints: M4 and NEWLIB.</div>
</li>
<li class="level1"><div class="li"> The best tools for creating footprints are PCB (wysiwyg), TEXT EDITOR (fast, accurate), SCRIPTING (powerful).</div>
</li>
<li class="level1"><div class="li"> <strong>For drawing footprints in PCB</strong>, refer to the <a href="http://pcb.geda-project.org/pcb-cvs/pcb.html#Library-Creation" class="urlextern" title="http://pcb.geda-project.org/pcb-cvs/pcb.html#Library-Creation"  rel="nofollow">section about library creation in the PCB manual</a>, look at the part “Creating Newlib Footprints” in the “New Style Libraries” subsection.</div>
</li>
<li class="level1"><div class="li"> <strong>For Scripting footprints</strong> see the <a href="pcb-footprint_generators.html" class="wikilink1" title="pcb-footprint_generators.html">footprint generators</a> page.</div>
</li>
<li class="level1"><div class="li"> Other things you may find helpful: calculator, paper+pencil, datasheets, calipers, spreadsheet.</div>
</li>
</ul>

</div>
<!-- EDIT2 SECTION "Footprint basics" [566-1408] -->
<h3 class="sectionedit3"><a name="manufacturer_references_for_laying_out_footprints" id="manufacturer_references_for_laying_out_footprints">Manufacturer references for laying out footprints</a></h3>
<div class="level3">
<ul>
<li class="level1"><div class="li"> <a href="http://www.nxp.com/package" class="urlextern" title="http://www.nxp.com/package"  rel="nofollow">http://www.nxp.com/package</a></div>
</li>
<li class="level1"><div class="li"> <a href="http://focus.ti.com/general/docs/packaging.jsp" class="urlextern" title="http://focus.ti.com/general/docs/packaging.jsp"  rel="nofollow">http://focus.ti.com/general/docs/packaging.jsp</a></div>
</li>
<li class="level1"><div class="li"> <a href="http://www.maxim-ic.com/design/packaging/" class="urlextern" title="http://www.maxim-ic.com/design/packaging/"  rel="nofollow">http://www.maxim-ic.com/design/packaging/</a></div>
</li>
<li class="level1"><div class="li"> <a href="http://www.national.com/packaging/folders/pkg_index.html" class="urlextern" title="http://www.national.com/packaging/folders/pkg_index.html"  rel="nofollow">http://www.national.com/packaging/folders/pkg_index.html</a></div>
</li>
<li class="level1"><div class="li"> <a href="http://www.irf.com/package/" class="urlextern" title="http://www.irf.com/package/"  rel="nofollow">http://www.irf.com/package/</a></div>
</li>
<li class="level1"><div class="li"> <a href="http://www.onsemi.com/PowerSolutions/supportTechDoc.do?id=1165" class="urlextern" title="http://www.onsemi.com/PowerSolutions/supportTechDoc.do?id=1165"  rel="nofollow">http://www.onsemi.com/PowerSolutions/supportTechDoc.do?id=1165</a></div>
</li>
<li class="level1"><div class="li"> <a href="http://www.analog.com/Analog_Root/Packages/Packages_Home/" class="urlextern" title="http://www.analog.com/Analog_Root/Packages/Packages_Home/"  rel="nofollow">http://www.analog.com/Analog_Root/Packages/Packages_Home/</a></div>
</li>
<li class="level1"><div class="li"> <a href="http://www.linear.com/designtools/PkgInfo.jsp" class="urlextern" title="http://www.linear.com/designtools/PkgInfo.jsp"  rel="nofollow">http://www.linear.com/designtools/PkgInfo.jsp</a></div>
</li>
</ul>

</div>
<!-- EDIT3 SECTION "Manufacturer references for laying out footprints" [1409-1869] -->
<h3 class="sectionedit4"><a name="sharing_pcb_footprints" id="sharing_pcb_footprints">Sharing PCB Footprints</a></h3>
<div class="level3">
<ul>
<li class="level1"><div class="li"> The place to share symbols and footprints is <a href="http://www.gedasymbols.org/" class="urlextern" title="http://www.gedasymbols.org"  rel="nofollow"> gedasymbols.org</a></div>
</li>
</ul>
<ul>
<li class="level1"><div class="li"> You can find many PCB footprints at <a href="http://www.luciani.org/geda/pcb/pcb-footprint-list.html" class="urlextern" title="http://www.luciani.org/geda/pcb/pcb-footprint-list.html"  rel="nofollow">John Luciani&#039;s footprint page</a></div>
</li>
</ul>
<ul>
<li class="level1"><div class="li"> You can share <a href="http://opencircuits.com/PCB_Footprints" class="urlextern" title="http://opencircuits.com/PCB_Footprints"  rel="nofollow"> gEDA footprints at Open Circuits</a>.</div>
</li>
</ul>

</div>
<!-- EDIT4 SECTION "Sharing PCB Footprints" [1870-2231] -->
<h3 class="sectionedit5"><a name="pcb_footprint_faq" id="pcb_footprint_faq">PCB Footprint FAQ</a></h3>
<div class="level3">

</div>

<h4><a name="how_do_pcb_s_footprints_work" id="how_do_pcb_s_footprints_work">How do PCB&#039;s footprints work?</a></h4>
<div class="level4">

<p>
PCB supports two entirely separate footprint library mechanisms:
</p>
<ol>
<li class="level1"><div class="li"> The first is referred to as the “oldlib”, “pcblib”, or the “M4 library”. This system uses the macro language M4 to generate footprints on the fly. The M4 library is fairly large.  A powerful feature of the m4 library is that an entire family of footprints can quickly be defined by defining an appropriate base macro.  Several standard families of footprints exist in pcblib.  Starting with the pcb-20070208 snapshot, the entire m4 library is available as “newlib” footprints (see the following paragraph) under the name “pcblib-newlib”.</div>
</li>
<li class="level1"><div class="li"> The second footprint library for PCB is called the “newlib”. Newlib footprints are defined using <acronym title="American Standard Code for Information Interchange">ASCII</acronym> text files which call out each graphical primitive which makes up an entire footprint.  Newlib footprints can either be created graphically using PCB or via any other method which can produce a text file (text editor, awk/perl/ruby script, etc.).  The use of a scripting or programming language is especially powerful because you can generate large footprints or families of footprints.</div>
</li>
</ol>

<p>
Therefore, during layout, you can use footprints which are distributed with
PCB, you can find footprints via a web search, or you can create your own, and
put them in a dedicated directory. <a href="http://pcb.geda-project.org/pcb-cvs/pcb.html" class="urlextern" title="http://pcb.geda-project.org/pcb-cvs/pcb.html"  rel="nofollow">The pcb manual</a> has complete and up to date documentation for the element file format.  <a href="http://gedasymbols.org/" class="urlextern" title="http://gedasymbols.org"  rel="nofollow">Gedasymbols.org</a> has a number of user contributed footprints.
</p>

</div>

<h4><a name="where_can_i_get_pre-drawn_footprints_for_pcb" id="where_can_i_get_pre-drawn_footprints_for_pcb">Where can I get pre-drawn footprints for PCB?</a></h4>
<div class="level4">
<ul>
<li class="level1"><div class="li"> Check your hard disk for <code>newlib</code> and <code>pcblib-newlib</code>. These directories contain the default footprint library of PCB.</div>
</li>
<li class="level1"><div class="li"> The best place to get additional footprints is the <a href="http://www.gedasymbols.org/" class="urlextern" title="http://www.gedasymbols.org"  rel="nofollow">gEDA Symbols website</a>. If you have you are welcome to contribute to the project and share your footprints.</div>
</li>
<li class="level1"><div class="li"> <a href="http://www.luciani.org/geda/pcb/pcb-footprint-list.html" class="urlextern" title="http://www.luciani.org/geda/pcb/pcb-footprint-list.html"  rel="nofollow">John Luciani&#039;s website</a> has a large number of footprints and tools.</div>
</li>
<li class="level1"><div class="li"> Darrell Harmon provides a nice footprint generating script <a href="http://www.dlharmon.com/geda/footgen.html" class="urlextern" title="http://www.dlharmon.com/geda/footgen.html"  rel="nofollow">on his website</a>.</div>
</li>
<li class="level1"><div class="li"> Finally, you can ask on the <a href="http://wiki.geda-project.org/geda:mailinglists" class="urlextern" title="http://wiki.geda-project.org/geda:mailinglists"  rel="nofollow">geda-user mailing list</a>, and somebody might take pity on you and send you a footprint.</div>
</li>
</ul>

</div>

<h4><a name="i_want_to_use_pcb_to_do_layout_how_do_i_know_what_value_to_use_for_the_footprint_attribute" id="i_want_to_use_pcb_to_do_layout_how_do_i_know_what_value_to_use_for_the_footprint_attribute">I want to use PCB to do layout. How do I know what value to use for the footprint attribute?</a></h4>
<div class="level4">

<p>
This question is a common one amongst new gEDA users. Indeed, helping newbies determine the appropriate footprint names lies at the core of the ongoing <a href="geda-faq-gschem.html#what_s_this_business_about_heavy_vs_light_symbols" class="wikilink1" title="geda-faq-gschem.html">light vs. heavy symbol</a> debate. In the current, light symbol gEDA/gaf distribution, you need to attach the footprint attribute at the schematic level (i.e. using either gschem or gattrib). The name of the footprint to use depends upon whether you are using the newlib or the M4 library (pcblib).
</p>

</div>

<h4><a name="newlib" id="newlib">Newlib</a></h4>
<div class="level4">

<p>
The newlib stores one footprint per file, and the footprint names used by the newlib are the file names of the footprint files.
</p>

<p>
There are several ways to determine the newlib footprint names to use:
</p>
<ul>
<li class="level1"><div class="li"> You can browse the available footprints by running pcb and opening the footprint library window (available from the menu bar via <strong><em>Window</em></strong> → <strong><em>Library</em></strong>). Click on the “newlib” library group, and then select a sublibrary to browse its symbols. The name of each footprint appears in the <strong>Elements</strong> window on the right hand side of the footprint library browser. Use the name exactly as it appears in the browser for the footprint attribute in gschem or gattrib.</div>
</li>
<li class="level1"><div class="li"> The newlib footprints distributed with PCB are stored in the directories under <strong><code>${PREFIX}/share/pcb/newlib</code></strong>. (<strong><code>${PREFIX}</code></strong> is the install directory you specified when configuring/building PCB.) The name to stick in the “footprint” attribute is the filename of the footprint you wish to use.<br/>
For example, on my machine I installed gEDA with the prefix <strong><code>/usr/local/geda/</code></strong>. The 0805 package (for SMT resistors or caps) lives in a file with absolute path<br/>
<strong><code>/usr/local/geda/share/pcb/newlib/generic_SMD_packages/0805_reflow_solder</code></strong> <br/>
Therefore, to use this footprint on a component I set its “footprint” attribute to <strong><code>0805_reflow_solder</code></strong> using gschem or gattrib.<br/>
Note that if the newlib symbol you want to use lives in a non-standard directory, gsch2pcb needs you to specify a path to that directory, either within your project.rc file (if you use one) or using the <strong><code>--elements-dir</code></strong> flag (from the command line).</div>
</li>
<li class="level1"><div class="li"> Finally, since each new design typically requires you to draw at least a couple of new footprints, it’s likely you will have a local “footprints” directory. As previously, the footprint name to use is the filename you assign to each of your new footprints. Again, don’t forget to add a line to your project.rc file telling gsch2pcb where to find your local footprints. Alternately, you can run gsch2pcb with the <strong><code>--elements-dir</code></strong> flag set to point to your local footprint directory.</div>
</li>
</ul>

</div>

<h4><a name="m4_library" id="m4_library">M4 library</a></h4>
<div class="level4">

<p>
The M4 library stores the footprints as M4 macros; there are usually several (many) footprints contained in each footprint file. The different footprints in a single file are generally variations on a single pattern (e.g. DIP-8, DIP-14, DIP-16, etc.)  The easiest way to find the correct footprint attribute name is by browsing through the “pcblib” library in the PCB library window.  The footprint attribute is given in square brackets in the description.  Also you can view the list of footprints from pcblib at the <a href="http://www.gedasymbols.org/footprints/" class="urlextern" title="http://www.gedasymbols.org/footprints/"  rel="nofollow">gEDA Symbols webpage</a>.
</p>

<p>
The following m4 libraries have received more attention and improvements than the others:
</p>
<ul>
<li class="level1"><div class="li"> ~amp for Amp connectors</div>
</li>
<li class="level1"><div class="li"> ~amphenol for Amphenol connectors</div>
</li>
<li class="level1"><div class="li"> ~geda for many diverse parts used in basic design using gEDA (resistors, caps, etc).</div>
</li>
<li class="level1"><div class="li"> ~bourns for products like trim pots from Bourns</div>
</li>
<li class="level1"><div class="li"> ~cts for products like resistor packs from CTS</div>
</li>
<li class="level1"><div class="li"> ~johnstech for Johnstech sockets</div>
</li>
<li class="level1"><div class="li"> ~minicircuits for Minicircuits specific footprints</div>
</li>
<li class="level1"><div class="li"> ~panasonic for some Panasonic specific footprints</div>
</li>
</ul>

<p>
Finally, for both the newlib and the M4 lib, it is extremely important that you verify that the footprint name you use instantiates *exactly* the footprint you want when you place it in PCB. Therefore, it is critical to inspect the footprint before you use it. You can verify the footprint you want to use by clicking on it in the “footprint library” window, and then placing it onto an empty spot in PCB’s drawing area. Manually inspect the footprint to ensure that it has the correct number of pins/pads, correct dimensions, etc.
</p>

<p>
Also, once you generate Gerber files, make sure you <a href="geda-pcb_tips.html#i_m_done_with_my_layout_how_should_i_check_my_design" class="wikilink1" title="geda-pcb_tips.html">inspect all footprints instantiated in your Gerbers</a> using gerbv (or an equivalent Gerber viewer) before you send your design out for fabrication.
</p>

</div>

<h4><a name="what_is_the_recommended_way_to_deal_with_different_footprints_for_the_same_sort_of_device" id="what_is_the_recommended_way_to_deal_with_different_footprints_for_the_same_sort_of_device">What is the recommended way to deal with different footprints for the same sort of device?</a></h4>
<div class="level4">

<p>
For example, an opamp may be DIP8 or SO8. A resistor may be 0603, 0805, 1208, or through-hole. How do I know what package and footprint to use, and how do I manage the choices?
</p>

<p>
First off, the footprint you should use is a decision for you to make, not your CAD tool. It is up to you to choose your preferred package type/footprint, and then attach the correct footprint attribute to the component in the schematic. Once you have chosen which package (and footprint) you wish to use, then either <a href="geda-pcb_tips.html#where_can_i_get_pre-drawn_footprints_for_pcb" class="wikilink1" title="geda-pcb_tips.html">find an appropriate footprint</a>, or <a href="geda-pcb_tips.html#how_do_i_draw_a_new_footprint" class="wikilink1" title="geda-pcb_tips.html">draw one yourself</a> and save it in a local directory.
</p>

<p>
As far as managing the footprint choices (and indeed the large number of component attributes you are likely to have): Use <a href="geda-faq-attribs.html#help_my_design_has_hundreds_of_components_and_it_s_a_pain_to_use_gschem_to_attach_all_my_attributes" class="wikilink1" title="geda-faq-attribs.html">gattrib</a>. That’s what it’s for.
</p>

</div>

<h4><a name="how_do_i_draw_a_new_footprint" id="how_do_i_draw_a_new_footprint">How do I draw a new footprint?</a></h4>
<div class="level4">

<p>
Everybody does this a little differently. Some people draw the footprint entirely using PCB. Some people first draw a preliminary footprint in PCB, and then finish it off by hand editing it (e.g. using emacs). Some people write <acronym title="Practical Extraction and Report Language">Perl</acronym> or Python scripts to autogenerate footprints.
</p>
<ul>
<li class="level1"><div class="li"> draw the part in PCB and save as a footprint. See the <a href="http://ronja.twibright.com/guidelines/footprints.php" class="urlextern" title="http://ronja.twibright.com/guidelines/footprints.php"  rel="nofollow">howto by Karel Kulhavy</a></div>
</li>
<li class="level1"><div class="li"> or use a <a href="http://dlharmon.com/geda/footgen.html" class="urlextern" title="http://dlharmon.com/geda/footgen.html"  rel="nofollow"> python script</a> by Darrel Harmon for “two pad”, “SOxx”, “tabbed” and QFP” style</div>
</li>
<li class="level1"><div class="li"> or use a <a href="http://www.luciani.org/geda/pcb/pcb-perl-library.html" class="urlextern" title="http://www.luciani.org/geda/pcb/pcb-perl-library.html"  rel="nofollow">perl script</a> from John Luciani – can be adapted to DIL, SOxx-Style, QFP, or even circular arrangement of pads.</div>
</li>
<li class="level1"><div class="li"> or use the web based application <a href="http://www.gedasymbols.org/user/dj_delorie/tools/dilpad.html" class="urlextern" title="http://www.gedasymbols.org/user/dj_delorie/tools/dilpad.html"  rel="nofollow">dilpad</a> written by DJ Delorie for “SOxx” style footprints.</div>
</li>
</ul>

</div>

<h4><a name="how_do_i_edit_change_an_existing_footprint" id="how_do_i_edit_change_an_existing_footprint">How do I edit/change an existing footprint?</a></h4>
<div class="level4">

<p>
You can convert a footprint into an ordinary layout, edit the parts and convert them back to footprint. In the following list the parts in bold italic font are actions from the <strong><em>Buffer</em></strong> menu.
</p>
<ol>
<li class="level1"><div class="li"> Select element</div>
</li>
<li class="level1"><div class="li"> Copy selection to buffer (<kbd>Ctrl</kbd>+<kbd>C</kbd>).</div>
</li>
<li class="level1"><div class="li"> <strong><em>Break buffer elements to pieces</em></strong>. Pins become vias and pads become tracks. Unfortunately, some information is lost during the process. Namely, the square flag names of pins and pads. You have to regenerate this information later.</div>
</li>
<li class="level1"><div class="li"> <strong><em>Paste buffer to layout</em></strong></div>
</li>
<li class="level1"><div class="li"> Do the desired changes. Note, that only vias, tracks and rectangles are allowed. No text, no arcs, no general polygons.</div>
</li>
<li class="level1"><div class="li"> Select all objects that belong to the footprint</div>
</li>
<li class="level1"><div class="li"> Copy selection to buffer (<kbd>Ctrl</kbd>+<kbd>C</kbd>). The position of the crosshair will determine the origin of the resulting footprint. The origin will be marked with a little diamond.</div>
</li>
<li class="level1"><div class="li"> <strong><em>Convert buffer to element</em></strong>. This converts vias to pins. Tracks and rectangles get SMD pads.</div>
</li>
<li class="level1"><div class="li"> <strong><em>Paste buffer to layout</em></strong></div>
</li>
<li class="level1"><div class="li"> Place the mouse over the pads that got rounded during step 4 and press <kbd>Q</kbd>. This squares off the rounded pad edges.</div>
</li>
<li class="level1"><div class="li"> Go over every pad, press <kbd>N</kbd> and give a name to the pad.</div>
</li>
<li class="level1"><div class="li"> Place the mouse somewhere where there is no pad or pin and give a name to the symbol.</div>
</li>
<li class="level1"><div class="li"> Move the name to the place where you want the refdes or the value to appear.</div>
</li>
<li class="level1"><div class="li"> Select everything and copy selection to buffer (<kbd>Ctrl</kbd>+<kbd>C</kbd>)</div>
</li>
<li class="level1"><div class="li"> <strong><em>Save buffer elements to file</em></strong>.</div>
</li>
</ol>

<p>
Alternatively, you can use your favorite text editor and edit the source code of the footprint.
</p>

</div>

<h4><a name="how_do_i_move_the_diamond_of_a_footprint" id="how_do_i_move_the_diamond_of_a_footprint">How do I move the diamond of a footprint</a></h4>
<div class="level4">

<p>
The origin of a footprint is marked with a little diamond. To move it to some other position relative to the footprint you have to modify all coordinates. This can be done manually with a text editor. If you want to do it from within the <acronym title="Graphical User Interface">GUI</acronym>, you need to break the footprint into pieces and assemble it again. See above for a detailed checklist. Note, that the position of the diamond is determined by the position of cross hair when copying to the buffer.
</p>

<p>
Yes, this is tedious. The reason for it is the lack of a real footprint editing mode in pcb. You are invited to write one.
</p>

</div>

<h4><a name="pcb_does_not_save_silk_when_i_try_to_make_a_footprint" id="pcb_does_not_save_silk_when_i_try_to_make_a_footprint">pcb does not save silk when I try to make a footprint</a></h4>
<div class="level4">

<p>
The silk of footprints can only deal with lines and arcs. All the other objects like polygons, rectangles and text are silently omitted during <strong><em>Convert buffer to element</em></strong>. If you need text in footprints you have to literary draw the letters with the line tool.
</p>

</div>

<h4><a name="what_is_the_proper_way_to_make_a_double-sided_footprint" id="what_is_the_proper_way_to_make_a_double-sided_footprint">What is the proper way to make a double-sided footprint?</a></h4>
<div class="level4">

<p>
You can use the “onsolder” flag to place pads on the opposite side of the
board. You would have something like this for a connector on both sides of the board:
</p>
<pre class="code">Pad[-40000 -7000 -40000 7000 2700 2400 3000 &quot;B1&quot; &quot;B1&quot; &quot;square&quot;]
Pad[-40000 -7000 -40000 3000 2700 2400 3000 &quot;A1&quot; &quot;A1&quot; &quot;square,onsolder&quot;]</pre>

<p>
If you draw the footprint with pcb-<acronym title="Graphical User Interface">GUI</acronym> and do <strong><em>Buffer</em></strong> → <strong><em>Convert buffer to element</em></strong>, the lines on the second layer become pads with the onsolder flag. Yes, it is the second layer, regardless its name.
</p>

</div>

<h4><a name="how_can_i_achieve_pads_without_paste" id="how_can_i_achieve_pads_without_paste">How can I achieve pads without paste?</a></h4>
<div class="level4">

<p>
Sometimes, exposed copper should not receive solder paste. A common example is the pads of an edge connector. This can be achieved with the <code>nopaste</code> <b>flag</b> [FIXME: Add a link to glossary]. Currently, there is no <acronym title="Graphical User Interface">GUI</acronym> way to set the flag. Use a text editor to add this flag to the pads of a footprint.
</p>

</div>

<h4><a name="how_do_i_add_a_footprint_library_to_pcb" id="how_do_i_add_a_footprint_library_to_pcb">How do I add a footprint library to PCB?</a></h4>
<div class="level4">

<p>
Adding footprint libraries can be done from the <acronym title="Graphical User Interface">GUI</acronym>:<br/>

<strong><em>File</em></strong> → <strong><em>Preferences…</em></strong> → <strong>Library</strong> → <code>FOOTPRINTDIRECTORY</code><br/>

Alternatively you can edit the file <code>$HOME/.pcb/preferences</code>. Make sure, no instance of pcb is currently running. Look for the line that starts with “library-newlib”.
Don’t forget to include the new directory into either your gsch2pcbrc, or your local gafrc file (if you are using gsch2pcb, that is).
</p>

</div>

<h4><a name="how_do_i_update_a_footprint_in_my_layout" id="how_do_i_update_a_footprint_in_my_layout">How do I update a footprint in my layout?</a></h4>
<div class="level4">

<p>
There is no way to automatically replace all instances of a footprint with the new version, yet. But there is a special mode of the buffer-paste tool, that will reduce the amount of clicks for manual replacement.<br/>

Use the <strong><em>Window</em></strong> → <strong><em>Library</em></strong> dialog box to manually choose the new footprint. The tool becomes the buffer-paste tool, with the new footprint preloaded. Rotate it if needed with <strong><em>Buffer</em></strong> → <strong><em>Rotate Buffer</em></strong>. Position the new footprint over the old one, and shift-left-mouse-click to replace the old footprint with the new one. Watch out for being 180 degrees off, use <kbd>O</kbd> to check the rats nest after each placement, and undo if it appears you placed it backwards.
</p>

</div>

<h4><a name="pcb_is_not_finding_my_footprints_why" id="pcb_is_not_finding_my_footprints_why">PCB is not finding my footprints. Why?</a></h4>
<div class="level4">

<p>
The footprint path that PCB uses is defined using the <strong><code>Pcb.elementPath</code></strong> variable in the app-defaults file named <strong><code>PCB</code></strong>. The path for the <strong><code>PCB</code></strong> file is set using the <strong><code>XAPPLRESDIR</code></strong> environment variable which is typically set from within the wrapper script named <strong><code>pcb</code></strong>.
</p>

</div>

<h4><a name="now_that_i_have_all_of_these_footprints_where_do_i_put_them" id="now_that_i_have_all_of_these_footprints_where_do_i_put_them">Now that I have all of these footprints where do I put them?</a></h4>
<div class="level4">

<p>
I prefer to place all “production-ready” footprints in a single directory that is not in the gEDA/PCB install tree. When a new version of gEDA/PCB comes out I do not make any changes to project files or libraries. If there are newlib footprints in the PCB library that I want to use I copy them to the “production-ready” footprint directory.
</p>

<p>
Rather than change configuration files to get gsch2pcb to find the footprints I create a wrapper script called <strong><code>sch2pcb</code></strong> that contains the footprint path. All users use the same script and access the same production footprints.
</p>

<p>
To use the <strong><code>sch2pcb</code></strong> script that is listed below replace the string <strong><code>FOOTPRINT_DIR</code></strong> with your footprint directory:
</p>
<pre class="code">#!/bin/bash
gsch2pcb --elements-dir FOOTPRINT_DIR $@</pre>

<p>
Or another user&#039;s version:
</p>
<pre class="code">#!/bin/bash
#this script was written by John Luciani
gsch2pcb --elements-dir /home/user/pcb/footprints/user --use-files $@</pre>

<p>
Alternatively you can make use of a project file which gsch2pcb reads for its options. For example the file <code>myproject</code> could look like this:
</p>
<pre class="code">schematics myschematic.sch myschematic2.sch
elements-dir /myfootprintdir
output-name mypcb
skip-m4</pre>

<p>
The example file searches through <code>myfootprintdir</code> for footprints used in <code>myschematic.sch</code> and <code>myschematic2.sch</code> and creates <code>mypcb.pcb</code> skipping m4 style footprints. gsch2pcb is then called with the project file as an option.
</p>
<pre class="code">gsch2pcb myproject</pre>

</div>

<h4><a name="can_i_have_two_pads_pins_with_the_same_pin-number" id="can_i_have_two_pads_pins_with_the_same_pin-number">Can I have two pads/pins with the same pin-number?</a></h4>
<div class="level4">

<p>
“Yes, totally.  This is how you create oval shaped copper around pins, or funny shaped pads (e.g. square at one end and round at the other) by overlapping two or more pads.”
</p>

</div>

<h4><a name="how_do_i_make_an_oval_shaped_pad_around_a_footprint_pin" id="how_do_i_make_an_oval_shaped_pad_around_a_footprint_pin">How do I make an oval shaped pad around a footprint pin?</a></h4>
<div class="level4">

<p>
Simply add a pad on top of your pin and give them the same pin-number.  If the soldermask is kept off both pins, and they overlap, they should appear as one pin on your board.
</p>

</div>

<h4><a name="how_do_i_make_a_2-sided_pad" id="how_do_i_make_a_2-sided_pad">How do I make a 2-sided pad?</a></h4>
<div class="level4">

<p>
“Odd as it sounds, this can be necessary for some edge connectors. … but how do you do it???”
</p>

<p>
You can do it by making two pads at the same position and same pin number,
but the second one with the flag “onsolder”. Like in:
</p>
<pre class="code">Pad[ 10mm -3mm  10mm 3mm  2.0mm 0.5mm 0.2mm &quot;1&quot; &quot;1&quot; &quot;square&quot; ]
Pad[ 10mm -3mm  10mm 3mm  2.0mm 0.5mm 0.2mm &quot;1&quot; &quot;1&quot; &quot;square,onsolder&quot; ]</pre>

</div>

<h4><a name="edge_connectors" id="edge_connectors">Edge Connectors</a></h4>
<div class="level4">

<p>
Do a 2-sided pad as above. If you want the shape of the connector pad
to be square at the edge end and half-round at the pcb-interior end, use
two overlapping pads per side, like in:
</p>
<pre class="code">Pad[  0   -3mm   0   3mm  2.0mm 0.5mm 0.2mm &quot;1&quot; &quot;1&quot; &quot;square&quot; ]
Pad[  0   -3mm   0   5mm  2.0mm 0.5mm 0.2mm &quot;1&quot; &quot;1&quot; &quot;&quot; ]</pre>
<pre class="code">Pad[  0   -3mm   0   3mm  2.0mm 0.5mm 0.2mm &quot;1&quot; &quot;1&quot; &quot;square,onsolder&quot; ]
Pad[  0   -3mm   0   5mm  2.0mm 0.5mm 0.2mm &quot;1&quot; &quot;1&quot; &quot;onsolder&quot; ]</pre>

</div>
<!-- EDIT5 SECTION "PCB Footprint FAQ" [2232-] --></div>
</body>
</html>
